/*
** my.h for myls in /home/nadali_t//local/psu/myls
** 
** Made by thomas nadalie
** Login   <nadali_t@epitech.net>
** 
** Started on  Mon Oct 29 14:27:05 2012 thomas nadalie
** Last update Mon Oct 29 14:27:42 2012 thomas nadalie
*/

#ifndef		__MY_H__
#define		__MY_H__

#include        <sys/types.h>
#include	<sys/stat.h>
#include	<unistd.h>
#include        <dirent.h>

typedef struct	s_list
{
  char		*name;
  char		*uid;
  char		*gid;
  int		size;
  int		ino;
  int		month;
  struct s_list	*next;
}		t_list;

int		no_options(struct dirent *d, DIR *dirp, struct stat sb, t_list **list);
int		option_l(struct dirent *d, DIR *dirp, struct stat sb, t_list **list);
int		option_a(struct dirent *d, DIR *dirp, struct stat sb, t_list **list);
int		my_strcmp(char *s1, char *s2);
int		my_strlen(char *str);
void		my_putstr(char *str);
void		my_putchar(char c);
int		my_tablen(char **tab);
void		my_put_nbr(int nb);
char		*get_path(char *arg);
int		fill_list(t_list **list, struct stat stat, struct dirent *d);
void		make_read(int ac, char **av, char *path);
void		make_read2(struct dirent *d, int ac, char **av, DIR *dirp);
int		check_opt(char **av, DIR *dirp, struct dirent *d, struct stat sb, t_list **list);
void	       	myls(int ac, char **av);
void		my_put_error(char *str);
int		my_showlist(t_list *list, int opt);
void		show_l(t_list *list);
void		show_a(t_list *list);

#endif
